-- Viral Resistance - T-Engine 4 Module
-- Copyright (C) 2010 Mikolai Fajer
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Mikolai Fajer "yufra"
-- mfajer@gmail.com

local Object = require "mod.class.Object"

-- Add the elevator button
local elevator_button = Object.new{
	name="Elevator Button",
	desc=[[A panel of buttons.]],
	display='x', color=colors.SLATE,
	can_talk = "elevator",
	show_tooltip=true,
	type = "button", subtype="button",
}

-- Add the lockdown button
local lockdown_button = Object.new{
	name="Lockdown Button",
	desc=[[A giant red button with the words "LOCKDOWN" written above it.]],
	display='x', color=colors.RED,
	can_talk = "lockdown",
	show_tooltip=true,
	type = "button", subtype="button",
}

-- Add signs
local newSign = function(tooltip)
	return Object.new{show_tooltip=true, tooltip=tooltip, name='sign', display='?', color=colors.GREY}
end

-- defineTile section
defineTile("#", "WALL")
defineTile("E", "ELEVATOR_DOOR")
defineTile("*", "WALL", nil, "EMERGENCY_LIGHT", nil, nil, {type="light", subtype="emergency"})
defineTile("<", "UP")
defineTile("o", "WINDOWED_DOOR")
defineTile("=", "DESK")
defineTile(">", "DOWN")
defineTile(".", "FLOOR")
defineTile("b", "FLOOR", lockdown_button)
defineTile("c", "WINDOWED_DOOR_OPENED", nil, "CHIEF_OF_VIROLOGY")
defineTile("B", "BED")
defineTile("!", "FLOOR", "ANTI_VIRALS")
defineTile("e", "WALL", elevator_button)

-- addSpot section
addSpot({31, 37}, "stairs", "e")
addSpot({33, 37}, "stairs", "f")
addSpot({33, 1}, "stairs", "b")
addSpot({66, 37}, "stairs", "h")
addSpot({31, 1}, "stairs", "a")
addSpot({66, 1}, "stairs", "d")
addSpot({64, 1}, "stairs", "c")
addSpot({64, 37}, "stairs", "g")
addSpot({30, 9}, "biohazard doors", "outer")
addSpot({30, 10}, "biohazard doors", "outer")
addSpot({31, 9}, "quests", "chief of medicine")
addSpot({27, 9}, "quests", "decontamination start")
addSpot({29, 10}, "quests", "lockdown safety")
addSpot({30, 10}, "quests", "lockdown safety")
addSpot({31, 10}, "quests", "lockdown safety")
addSpot({28, 9}, "biohazard doors", "inner")
addSpot({28, 10}, "biohazard doors", "inner")

-- addZone section

-- ASCII map section
return [[
##################################################################################################
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#<#>##############################<#>#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#.*.##############################.*.#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#....#....#....#....#....#....#...##############################...#....#....#....#....#....#....#
#....#....#....#....#....#....#...##############################...#....#....#....#....#....#....#
###c#*#o##*##o#*#o##*##o#*#o####o################################o####o#*#o##*##o#*#o##*##o#*#o###
#.............................#....................................#.............................#
#.............................#....................................#.............................#
#...!=====.=====.======....b###....................................#.......======.=====.=====....#
#....=................=.....o.o...##############################...o.......=................=....#
#....=................=.....o.o...##############################...o.......=................=....#
#....=====.=====.======.....###...##############################...#.......======.=====.=====....#
#.............................#...##############################...#.............................#
#.............................#...##############################...#.............................#
###o#*#o##*##o#*#o##*##o#*#o###...##############################...###o#*#o##*##o#*#o##*##o#*#o###
#....#....#....#....#....#....#...###########...#...############...#....#....#....#....#....#....#
#....#....#....#....#....#....#...###########...e...############...#....#....#....#....#....#....#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#...############E#*#E#############...#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#....................................#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
###############################....................................###############################
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#....................................#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#...############E#*#E#############...#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#....#....#....#....#....#....#...###########...e...############...#....#....#....#....#....#....#
#....#....#....#....#....#....#...###########...#...############...#....#....#....#....#....#....#
###o#*#o##*##o#*#o##*##o#*#o###...##############################...###o#*#o##*##o#*#o##*##o#*#o###
#.............................#...##############################...#.............................#
#.............................#...##############################...#.............................#
#....=====.=====.======.......#...##############################...#.......======.=====.=====....#
#....=................=.......o...##############################...o.......=................=....#
#....=................=.......o...##############################...o.......=................=....#
#....=====.=====.======.......#....................................#.......======.=====.=====....#
#.............................#....................................#.............................#
#.............................#....................................#.............................#
###o#*#o##*##o#*#o##*##o#*#o####o################################o####o#*#o##*##o#*#o##*##o#*#o###
#....#....#....#....#....#....#...##############################...#....#....#....#....#....#....#
#....#....#....#....#....#....#...##############################...#....#....#....#....#....#....#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#.*.##############################.*.#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#<#>##############################<#>#.BB.#.BB.#.BB.#.BB.#.BB.#.BB.#
##################################################################################################]]